import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;



public class MainWindow {
// jestem
	private JPanel mapPanel;
	private JPanel memoryViewPanel;
	private JPanel consolePanel;
	private JPanel controlPanel;

	/**
	 * Opens main window of application.
	 *
	 * @param args
	 */
	public static void main(String[] args) {
		new MainWindow();
	}
	
	private MainWindow() {
		JFrame mainWindow = new JFrame("Cleaning Robot");
		mainWindow.setBounds(100, 100, 500, 400);
		mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		mainWindow.setLayout(new GridLayout(2, 2));
		
		mapPanel = new JPanel();
		mapPanel.setBackground(Color.RED);
		JScrollPane mapJScrollPane = new JScrollPane(mapPanel);
		mainWindow.add(mapJScrollPane);
		
		memoryViewPanel = new JPanel();
		memoryViewPanel.setBackground(Color.BLUE);
		JScrollPane memoryJScrollPane = new JScrollPane(memoryViewPanel);
		mainWindow.add(memoryJScrollPane);
		
		consolePanel = new JPanel();
		consolePanel.setBackground(Color.YELLOW);
		JScrollPane consoleJScrollPane = new JScrollPane(consolePanel);
		mainWindow.add(consoleJScrollPane);
		
		controlPanel = new JPanel();
		controlPanel.setBackground(Color.GREEN);
		JScrollPane controlJScrollPane = new JScrollPane(controlPanel);
		mainWindow.add(controlJScrollPane);
		
		controlPanel.setLayout(new GridLayout(10, 10));
		for (int i=0 ; i<100 ; i++) {
			controlPanel.add(
					new JLabel("Napis " + Integer.toString(i) + "\n"));
		}

		mainWindow.setVisible(true);
	}

}
